patchelf missing snap libdir rpath
Metadata
Current evaluation
No evaluation has been recorded for this issue yet.
Issue body
Building a Flutter app into a classic snap, I found the patchelf machinery isn't consistent:
```
Executing action
Patch ELF file: 'bin/lib/libflutter_linux_gtk.so'
Current rpath=['$ORIGIN']
Proposed rpath=['$ORIGIN', '/snap/core22/current/lib/x86_64-linux-gnu']
Patch ELF file: 'bin/lib/libxdg_icons_plugin.so'
Current rpath=['/root/parts/launcher/build/linux/flutter/ephemeral']
Proposed rpath=['$ORIGIN', '/snap/core22/current/lib/x86_64-linux-gnu']
…
Lint warnings:
- classic: bin/lib/libflutter_linux_gtk.so: ELF rpath should be set to '$ORIGIN:$ORIGIN/../../usr/lib/x86_64-linux-gnu:/snap/core22/current/lib/x86_64-linux-gnu'. (https://snapcraft.io/docs/linters-classic)
- classic: bin/lib/libxdg_icons_plugin.so: ELF rpath should be set to '$ORIGIN/../../usr/lib/x86_64-linux-gnu:$ORIGIN:/snap/core22/current/lib/x86_64-linux-gnu'. (https://snapcraft.io/docs/linters-classic)
```
You can see that the "Proposed rpath" is inconsistent with what the linter wants (missing the snap libdir).
Evaluation history
No evaluation history available.